<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>queryHuman.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type='text/javascript' src='/HR_Sys/dwr/interface/JconfigFileBIZ.js'></script>
  	<script type='text/javascript' src='/HR_Sys/dwr/engine.js'></script>
  	<script type='text/javascript' src='/HR_Sys/dwr/util.js'></script>  	
  	<script type="text/javascript" src="/HR_Sys/javascript/My97DatePicker/WdatePicker.js"  defer="defer"></script>
  	<script src='/HR_Sys/javascript/prototype.js'></script>
  	<script type="text/javascript">
  		function second(){	  		
		  		var second=$("queryHumanFile.firstKindId").value;
		  		JconfigFileBIZ.getConfigFileSecondKindList(second,showSecond);
	  		}
	  	function showSecond(data){
	  		var second=$("queryHumanFile.secondKindId");						//获得二级机构下拉框对象
	  		dwr.util.removeAllOptions(second);									//清空二级机构下拉框
	  		dwr.util.addOptions(second,["---请选择---"]);							//填充二级下拉框
	  		var third=$("queryHumanFile.thirdKindId");							//获得三级下拉框对象
	  		dwr.util.removeAllOptions(third);									//清空三级下拉框
	  		dwr.util.addOptions(third,["---请选择---"]);							//填充三级下拉框
	  		dwr.util.addOptions(second,data,"secondKindId","secondKindName");
	  	}
	  	function third(){
	  		var third=$("queryHumanFile.secondKindId").value;
	  		JconfigFileBIZ.getConfigFileThirdKindList(third,showThird);	  	
	  	}
	  	
	  	function showThird(data){
	  		var third=$("queryHumanFile.thirdKindId");							//获得下拉框对象
	  		dwr.util.removeAllOptions(third);									//清空下拉框
	  		dwr.util.addOptions(third,["---请选择---"]);							//填充下拉框
	  		dwr.util.addOptions(third,data,"thirdKindId","thirdKindName");
	  	}
	  	function configMajor(){
	  		var major=$("queryHumanFile.humanMajorKindId").value;	  		
	  		JconfigFileBIZ.getConfigMajorList(major,showConfigMajor);	  			  	
	  	}
	  	
	  	function showConfigMajor(data){	  	  	
	  		var major=$("queryHumanFile.humanMajorId");
	  		dwr.util.removeAllOptions(major);
	  		dwr.util.addOptions(major,['---请选择---']);
	  		dwr.util.addOptions(major,data,'majorId','majorName');
	  	}
	  	
  	</script>
  </head>
  
  <body>
    <html:form action="/majorChange.do?op=queryHuman" method="post">
    	
    	<bean:size name="majorChangeForm" property="configFileFirstKindList" id="size"/>
    	<c:if test="${empty requestScope.majorChangeForm.configFileFirstKindList}">
    		<c:redirect url="/majorChange.do?op=queryHuman"/>
    	</c:if>
	    <table>
	    	<tr>
	    		<td colspan="6">您正在做的业务是:人力资源--调动管理--调动查询</td>
	    	</tr>
	    	<tr>
	    		<td>I级机构</td>
	       		<td>
	       			<html:select property="queryHumanFile.firstKindId" value="0" name="majorChangeForm" styleId="queryHumanFile.firstKindId"  onchange="second()">
	       				<html:option value="---请选择---">---请选择---</html:option>
	       				<html:optionsCollection name="majorChangeForm" property="configFileFirstKindList" label="firstKindName" value="firstKindId"/>
	       			</html:select>
	       		</td>
	       		<td>II级机构</td>
    			<td>
    				<html:select name="majorChangeForm" property="queryHumanFile.secondKindId" styleId="queryHumanFile.secondKindId"  onchange="third()">
    			 		<html:option value="---请选择---">---请选择---</html:option>
    			 	</html:select>
    			</td>
    			<td>III级机构</td>  
    			<td>
    				<html:select name="majorChangeForm" property="queryHumanFile.thirdKindId" styleId="queryHumanFile.thirdKindId">
    					<html:option value="---请选择---">---请选择---</html:option>
    			 	</html:select>
    			</td>
	    	</tr>
	    	<tr>
	    		<td>请输入建档时间</td>
	    		<td colspan="5">
	    			<input type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>至
	    			<input type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>
	    		</td>
	    	</tr>
	    	<tr>
	    		<td colspan="6"><html:submit>查询</html:submit></td>
	    	</tr>
	    </table>
	    <table>
	    	<tr>
	    		<td>档案编号</td>
    			<td>姓名</td>
    			<td>I级机构</td>
    			<td>II级机构</td>
    			<td>III级机构</td>
    			<td>状态</td>
	    	</tr>
	    	
	    		<logic:notEmpty name="majorChangeForm"  property="queryHumanFileList">
	    			<logic:iterate id="human"  property="queryHumanFileList" name="majorChangeForm">
	    				<tr>
		    				<td><html:link action="majorChange.do?op=editHuman&humanId=${human.humanId}">${human.humanId}</html:link></td>
		    				<td>${human.humanName}</td>
		    				<td>${human.firstKindName }</td>
		    				<td>${human.secondKindName }</td>
		    				<td>${human.thirdKindName }</td>
		    				<td>${human.humanFileStatus==1?"正常":"非正常"}</td>
	    				</tr>
	    			</logic:iterate>
	    		</logic:notEmpty>
	    		<logic:empty name="majorChangeForm"  property="queryHumanFileList">
	    			<tr>
	    				<td colspan="6">没有相关记录!</td>
	    			</tr>
	    		</logic:empty>
	    </table>
	  </html:form>
  </body>
</html:html>
